![]() |
PhoenixInkscape
2.0.0
Generate multiple png files with svg inkscape files
|
classe qui permet de parser des fichiers texte en renvoyant les tokens les uns après les autres More...
#include <PFileParser.h>
Public Member Functions | |
void | clear () |
Clear the save position of the parser in ther current file. More... | |
size_t | getColumn () const |
Fonction qui renvoie le numéro de la colonne du caractère courant. More... | |
char | getCurrentCh () const |
Renvoie le caractère courant. More... | |
size_t | getCurrentCharIdx () const |
Return the index of the current character. More... | |
PString | getCurrentRow () const |
Get the current parsed row. More... | |
char | getEscapeChar () const |
Gets the escape character of the PFileParser. More... | |
PPath | getFileName () const |
Fonction qui renvoie le nom du fichier que l'on a ouvert. More... | |
size_t | getLine () const |
Fonction qui renvoie le numéro de la ligne courante. More... | |
size_t | getLineIndentation () |
Get the current line indentation. More... | |
PLocation | getLocation () const |
Fonction qui renvoie la PLocation du PFileParser. More... | |
size_t | getNbTotalChar () const |
Return the number of characters in the current opened file. More... | |
char | getNextChar () |
Fonction qui renvoie le prochain caractère du fichier courant. More... | |
PString | getNextToken () |
Get the next token. More... | |
PString | getNextToken (PString &skippedStr) |
Get the next token and return also the skipped characters until the next token. More... | |
char | getPrevCh () const |
Renvoie le caractère courant. More... | |
PString | getSeparator () const |
renvoie la liste des caractères séparateurs More... | |
PString | getStrComposedOf (const PString &charset) |
Get string composed of the characters in the string charset. More... | |
PString | getUntilKey (const PString &patern) |
Renvoie la chaine de caractère du caractère courant jusqu'à patern comprise. More... | |
PString | getUntilKeyWithoutPatern (const PString &patern) |
Renvoie la chaine de caractère du caractère courant jusqu'à patern exclu. More... | |
PString | getUntilKeyWithoutPaternExclude (const PString &patern, const PString &strNotBeforeEndPatern) |
Parse a string until the patern is found, only if it has not strNotBeforeEndPatern before it. More... | |
PString | getUntilKeyWithoutPaternRecurse (const PString &patern, const PString &beginPatern) |
Get the string until end sequence and take account recursive patern (embeded strings) More... | |
PString | getUntilKeyWithoutPaternRecurse (const PString &patern, const PString &beginPatern, const PString &allowedCharAfterBegin) |
Get the string until end sequence and take account recursive patern (embeded strings) More... | |
PString | getUntilKeyWithoutPaternRecurseExclude (const PString &patern, const PString &beginPatern, const PString &echapExpr) |
Get the string until end sequence and take account recursive patern (embeded strings) More... | |
PString | getWhiteSpace () const |
renvoie la liste des caractères blancs More... | |
bool | isChSeparator () const |
Dis si le caractère courant est un séparateur. More... | |
bool | isChSpace () const |
Dis si le caractère courant est un caractère blanc. More... | |
bool | isEndOfFile () const |
Dit si on est à la fin du fichier. More... | |
PString | isMatch (const PParseSeq &seq) |
Check the matching of a sequence in the current file. More... | |
bool | isMatch (const PString &patern) |
Says if the patern match with the current caracters of the PFileParser. More... | |
bool | isMatch (const PString &patern, const PString &forbiddenCharBefore) |
Says if the patern match with the current caracters of the PFileParser. More... | |
PString | isMatch (const PVecString &patern) |
Check the matching between the current caracters and all the string in the vector. More... | |
PString | isMatch (const std::vector< PVecString > &patern) |
Check the matching between the current caracters and all the string in the list of list of string. More... | |
bool | isMatchRewind (const PString &patern) |
Do a isMatch and then go back at the previous position. More... | |
bool | isMatchSeq (const PVecString &patern, bool alwaysPopBack=false) |
Match a sequence of token in a vector. More... | |
bool | isMatchToken (const PString &patern) |
Says if the patern match with the current caracters of the PFileParser but treats the string as a token (cannot be part of a word) More... | |
PString | isMatchToken (const PVecString &patern) |
Check the matching between the current caracters and all the string in the vector but treats the string as a token (cannot be part of a word) More... | |
template<typename T > | |
bool | isMatchToken (PString &matchKey, T &matchValue, const std::map< PString, T > &patern) |
Check if one key of the map, matches the current token. More... | |
bool | isWhiteSpace () |
Says if the current char is a white space. More... | |
bool | open (const PPath &fileName) |
Fonction qui ouvre le fichier que l'on va parser. More... | |
PFileParser () | |
Constructeur de PFileParser. More... | |
void | popPosition () |
Get to the last saved position of the PFileParser in the current file. More... | |
void | pushPosition () |
Remember the current position of the PFileParser in the current file. More... | |
void | setColumn (size_t currentCol) |
Set the current column of the PFileParser. More... | |
void | setEscapeChar (char escapeChar) |
Sets the escape character of the PFileParser. More... | |
void | setFileContent (const PString &fileContent) |
Set the file content. More... | |
void | setLine (size_t currentLine) |
Set the current line of the PFileParser. More... | |
void | setLocation (const PLocation &location) |
Set the current location of the PFileParser. More... | |
void | setSeparator (const PString &separator) |
Initialise la liste des caractères séparateurs. More... | |
void | setWhiteSpace (const PString &whiteSpace) |
Initialise la liste des caractères blancs. More... | |
void | skipChars (const PString &chToSkip) |
Skip the characters in the given string. More... | |
void | skipWhiteSpace () |
Skip the white space if there is at the current caracter position. More... | |
virtual | ~PFileParser () |
Destructeur de PFileParser. More... | |
Private Member Functions | |
void | incrementCurrentChar (size_t nbChar=1lu) |
Increment the current caracter. More... | |
void | incrementCurrentLine () |
Increment the current line. More... | |
void | initialisationPFileParser () |
Fonction d'initialisation du PFileParser. More... | |
Private Attributes | |
size_t | p_currentChar |
Numéro du caractère courant. More... | |
size_t | p_currentLine |
Numéro de la ligne courante. More... | |
size_t | p_currentLineFirstColumn |
Number of the first column caracter of the current line. More... | |
bool | p_dontSkipSpace |
Say if we don't want to skip the spaces. More... | |
char | p_echapChar |
Echap caracter. More... | |
PString | p_fileContent |
Contenu du fichier de configuration. More... | |
PPath | p_fileName |
Nom du fichier que l'on veut parser. More... | |
PString | p_listSeparator |
liste des séparateurs More... | |
PString | p_listWhiteSpace |
liste des espaces blancs More... | |
size_t | p_nbTotalChar |
Nombre de caractères total. More... | |
std::vector< size_t > | p_vecLine |
Vector of all the checkpoint rows in the text file (added with pushPosition() and removed with popPosition() or clear() More... | |
std::vector< size_t > | p_vecPosition |
Vector of all the checkpoint positions in the text file (added with pushPosition() and removed with popPosition() or clear() More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const PFileParser &other) |
Définition de l'opérateur de flux sortant. More... | |
classe qui permet de parser des fichiers texte en renvoyant les tokens les uns après les autres
Definition at line 20 of file PFileParser.h.
PFileParser::PFileParser | ( | ) |
Constructeur de PFileParser.
Definition at line 11 of file PFileParser.cpp.
References initialisationPFileParser().
|
virtual |
void PFileParser::clear | ( | ) |
Clear the save position of the parser in ther current file.
Definition at line 110 of file PFileParser.cpp.
References p_vecLine, and p_vecPosition.
Referenced by testPFileParserBase().
size_t PFileParser::getColumn | ( | ) | const |
Fonction qui renvoie le numéro de la colonne du caractère courant.
Definition at line 692 of file PFileParser.cpp.
References p_currentChar, and p_currentLineFirstColumn.
Referenced by getLocation(), and PMultiFileParser::pointAtRow().
char PFileParser::getCurrentCh | ( | ) | const |
Renvoie le caractère courant.
Definition at line 669 of file PFileParser.cpp.
References isEndOfFile(), p_currentChar, and p_fileContent.
Referenced by testPFileParserVecVecIsMatch().
size_t PFileParser::getCurrentCharIdx | ( | ) | const |
Return the index of the current character.
Definition at line 708 of file PFileParser.cpp.
References p_currentChar.
Referenced by PMultiFileParser::fullParsing(), and testPFileParserVecVecIsMatch().
PString PFileParser::getCurrentRow | ( | ) | const |
Get the current parsed row.
Definition at line 415 of file PFileParser.cpp.
References isEndOfFile(), p_currentChar, and p_fileContent.
Referenced by PMultiFileParser::pointAtRow(), and testPFileParserGetCurrentRow().
char PFileParser::getEscapeChar | ( | ) | const |
Gets the escape character of the PFileParser.
Definition at line 134 of file PFileParser.cpp.
References p_echapChar.
Referenced by testPFileParserBase().
PPath PFileParser::getFileName | ( | ) | const |
Fonction qui renvoie le nom du fichier que l'on a ouvert.
Definition at line 141 of file PFileParser.cpp.
References p_fileName.
Referenced by testPFileParserBase().
size_t PFileParser::getLine | ( | ) | const |
Fonction qui renvoie le numéro de la ligne courante.
Definition at line 685 of file PFileParser.cpp.
References p_currentLine.
Referenced by testPFileParserVecVecIsMatch().
size_t PFileParser::getLineIndentation | ( | ) |
Get the current line indentation.
Definition at line 715 of file PFileParser.cpp.
References p_currentChar, p_currentLineFirstColumn, p_fileContent, and p_nbTotalChar.
PLocation PFileParser::getLocation | ( | ) | const |
Fonction qui renvoie la PLocation du PFileParser.
Definition at line 732 of file PFileParser.cpp.
References getColumn(), p_currentLine, and p_fileName.
Referenced by PMultiFileParser::errorAt(), DicoValue::errorAt(), PMultiFileParser::fullParsing(), pxml_parserXmlAttribute(), and pxml_parserXmlContent().
size_t PFileParser::getNbTotalChar | ( | ) | const |
Return the number of characters in the current opened file.
Definition at line 701 of file PFileParser.cpp.
References p_nbTotalChar.
char PFileParser::getNextChar | ( | ) |
Fonction qui renvoie le prochain caractère du fichier courant.
Definition at line 187 of file PFileParser.cpp.
References incrementCurrentChar(), p_currentChar, p_fileContent, and p_nbTotalChar.
Referenced by testPFileParserBase().
PString PFileParser::getNextToken | ( | ) |
Get the next token.
Definition at line 148 of file PFileParser.cpp.
Referenced by PMultiFileParser::checkExpectedMatch(), PMultiFileParser::getCurrentTokenWithoutComment(), pxml_parserXmlAttribute(), testPFileParserGetNextToken(), testPFileParserGetNextToken2(), and PMultiFileParser::unexpectedToken().
Get the next token and return also the skipped characters until the next token.
[out] | skippedStr | : string of skipped characters |
Definition at line 157 of file PFileParser.cpp.
References PString::find(), incrementCurrentChar(), isEndOfFile(), p_currentChar, p_fileContent, p_listSeparator, and p_listWhiteSpace.
char PFileParser::getPrevCh | ( | ) | const |
Renvoie le caractère courant.
Definition at line 677 of file PFileParser.cpp.
References isEndOfFile(), p_currentChar, and p_fileContent.
Referenced by testPFileParserVecVecIsMatch().
PString PFileParser::getSeparator | ( | ) | const |
renvoie la liste des caractères séparateurs
Definition at line 662 of file PFileParser.cpp.
References p_listSeparator.
Referenced by testPFileParserVecVecIsMatch().
Get string composed of the characters in the string charset.
charset | : set of the available characters to get the current string |
Definition at line 394 of file PFileParser.cpp.
References PString::eraseChar(), PString::find(), incrementCurrentChar(), isEndOfFile(), p_currentChar, p_fileContent, p_listWhiteSpace, and skipChars().
Referenced by PMultiFileParser::getStrComposedOf(), isMatch(), DicoValue::parseDicoValue(), pxml_parserXmlAttribute(), and pxml_parserXmlContent().
Renvoie la chaine de caractère du caractère courant jusqu'à patern comprise.
patern | : séquence d'arrêt |
Definition at line 202 of file PFileParser.cpp.
References getUntilKeyWithoutPatern(), isEndOfFile(), and p_nbTotalChar.
Referenced by PMultiFileParser::getCurrentTokenWithoutComment(), parse_generic_string(), PMultiFileParser::skipComment(), and testPFileParserGetUntilKey().
Renvoie la chaine de caractère du caractère courant jusqu'à patern exclu.
patern | : séquence d'arrêt |
Definition at line 211 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, p_currentLine, p_fileContent, and p_nbTotalChar.
Referenced by createNestedCallFromStr(), dico_create_nested_call(), getUntilKey(), ConfigParser::parseDocString(), ConfigParser::parseFile(), DicoValue::parseString(), pxml_parserXmlAttribute(), pxml_parserXmlContent(), and testPFileParserPartern().
PString PFileParser::getUntilKeyWithoutPaternExclude | ( | const PString & | patern, |
const PString & | strNotBeforeEndPatern | ||
) |
Parse a string until the patern is found, only if it has not strNotBeforeEndPatern before it.
patern | : patern to be found |
strNotBeforeEndPatern | : string which cannot be found before the patern, otherwise the patern is not considered as the end |
Definition at line 251 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), isMatch(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_nbTotalChar.
Referenced by testPFileParserParternExclude().
PString PFileParser::getUntilKeyWithoutPaternRecurse | ( | const PString & | patern, |
const PString & | beginPatern | ||
) |
Get the string until end sequence and take account recursive patern (embeded strings)
patern | : end patern |
beginPatern | : definition of new embeded string |
Definition at line 362 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), isMatch(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_nbTotalChar.
PString PFileParser::getUntilKeyWithoutPaternRecurse | ( | const PString & | patern, |
const PString & | beginPatern, | ||
const PString & | allowedCharAfterBegin | ||
) |
Get the string until end sequence and take account recursive patern (embeded strings)
patern | : end patern |
beginPatern | : definition of new embeded string |
allowedCharAfterBegin | : characters allowed after the beginPatern |
Definition at line 283 of file PFileParser.cpp.
References PString::find(), incrementCurrentChar(), isEndOfFile(), isMatch(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_nbTotalChar.
Referenced by testPFileParserParternRecurse(), testPFileParserParternRecurse2(), and testPFileParserParternRecurseAllowChar().
PString PFileParser::getUntilKeyWithoutPaternRecurseExclude | ( | const PString & | patern, |
const PString & | beginPatern, | ||
const PString & | echapExpr | ||
) |
Get the string until end sequence and take account recursive patern (embeded strings)
patern | : end patern |
beginPatern | : definition of new embeded string |
echapExpr | : echap expression |
Definition at line 320 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), isMatch(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_nbTotalChar.
Referenced by testPFileParserParternRecurseExcludeEnd(), and testPFileParserParternRecurseExcludeEnd2().
PString PFileParser::getWhiteSpace | ( | ) | const |
renvoie la liste des caractères blancs
Definition at line 655 of file PFileParser.cpp.
References p_listWhiteSpace.
|
private |
Increment the current caracter.
nbChar | : number of char to go ahead |
Definition at line 767 of file PFileParser.cpp.
References incrementCurrentLine(), p_currentChar, p_echapChar, p_fileContent, and p_nbTotalChar.
Referenced by getNextChar(), getNextToken(), getStrComposedOf(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), isMatch(), isWhiteSpace(), skipChars(), and skipWhiteSpace().
|
private |
Increment the current line.
Definition at line 759 of file PFileParser.cpp.
References p_currentChar, p_currentLine, and p_currentLineFirstColumn.
Referenced by incrementCurrentChar().
|
private |
Fonction d'initialisation du PFileParser.
Definition at line 747 of file PFileParser.cpp.
References p_currentChar, p_currentLine, p_currentLineFirstColumn, p_dontSkipSpace, p_echapChar, p_fileContent, p_listSeparator, and p_listWhiteSpace.
Referenced by PFileParser().
bool PFileParser::isChSeparator | ( | ) | const |
Dis si le caractère courant est un séparateur.
Definition at line 126 of file PFileParser.cpp.
References PString::find(), isEndOfFile(), p_currentChar, p_fileContent, and p_listSeparator.
Referenced by testPFileParserBase().
bool PFileParser::isChSpace | ( | ) | const |
Dis si le caractère courant est un caractère blanc.
Definition at line 118 of file PFileParser.cpp.
References PString::find(), isEndOfFile(), p_currentChar, p_fileContent, and p_listWhiteSpace.
Referenced by testPFileParserBase().
bool PFileParser::isEndOfFile | ( | ) | const |
Dit si on est à la fin du fichier.
Definition at line 88 of file PFileParser.cpp.
References p_currentChar, and p_nbTotalChar.
Referenced by createNestedCallFromStr(), dico_create_nested_call(), PMultiFileParser::fullParsing(), getCurrentCh(), getCurrentRow(), PMultiFileParser::getCurrentTokenWithoutComment(), getNextToken(), getPrevCh(), getStrComposedOf(), getUntilKey(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), isChSeparator(), isChSpace(), isMatch(), isWhiteSpace(), DicoValue::loadParser(), DicoValue::parseListOrMap(), pxml_parserXmlAttribute(), pxml_parserXmlContent(), skipChars(), PMultiFileParser::skipComment(), and skipWhiteSpace().
Check the matching of a sequence in the current file.
seq | : sequence to be checked |
Definition at line 582 of file PFileParser.cpp.
References getStrComposedOf(), PParseSeq::getVecStep(), isMatch(), popPosition(), and pushPosition().
bool PFileParser::isMatch | ( | const PString & | patern | ) |
Says if the patern match with the current caracters of the PFileParser.
patern | : patern we want to check (this patern should not begin with white caracters) |
Definition at line 441 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, p_fileContent, p_nbTotalChar, and skipWhiteSpace().
Referenced by PMultiFileParser::checkExpectedMatch(), checkParseSeq(), PMultiFileParser::getCurrentTokenWithoutComment(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), isMatch(), PMultiFileParser::isMatch(), isMatchRewind(), isMatchSeq(), isMatchToken(), parse_generic_string(), DicoValue::parseDicoValue(), DicoValue::parseListOrMap(), DicoValue::parseString(), pxml_isAttributeEnd(), pxml_parserXmlAttribute(), pxml_parserXmlContent(), PMultiFileParser::skipComment(), testPFileParserIsMatch(), testPFileParserSeq(), testPFileParserSeqOneStep(), testPFileParserVecIsMatch(), and testPFileParserVecVecIsMatch().
Says if the patern match with the current caracters of the PFileParser.
patern | : patern we want to check (this patern should not begin with white caracters) |
forbiddenCharBefore | : lisr of characters which cannot be just before the first character of the patern |
Definition at line 495 of file PFileParser.cpp.
References PString::find(), isMatch(), p_currentChar, and p_fileContent.
PString PFileParser::isMatch | ( | const PVecString & | patern | ) |
Check the matching between the current caracters and all the string in the vector.
patern | : vector of the patern we want to check |
Definition at line 536 of file PFileParser.cpp.
References isMatch().
PString PFileParser::isMatch | ( | const std::vector< PVecString > & | patern | ) |
Check the matching between the current caracters and all the string in the list of list of string.
patern | : list of the list of the patern we want to check |
Definition at line 564 of file PFileParser.cpp.
References isMatch().
bool PFileParser::isMatchRewind | ( | const PString & | patern | ) |
Do a isMatch and then go back at the previous position.
patern | : patern we want to check (this patern should not begin with white caracters) |
Definition at line 463 of file PFileParser.cpp.
References isMatch(), popPosition(), and pushPosition().
Referenced by PMultiFileParser::isMatchRewind(), and DicoValue::parseListOrMap().
bool PFileParser::isMatchSeq | ( | const PVecString & | patern, |
bool | alwaysPopBack = false |
||
) |
Match a sequence of token in a vector.
patern | : set of token to match in this order and totally |
alwaysPopBack | : true to make the PFileParser at the exact same place before the check even is the sequence matches |
Definition at line 475 of file PFileParser.cpp.
References isMatch(), popPosition(), and pushPosition().
Referenced by PMultiFileParser::isMatchSeq(), and testPFileParserMatchSeq().
bool PFileParser::isMatchToken | ( | const PString & | patern | ) |
Says if the patern match with the current caracters of the PFileParser but treats the string as a token (cannot be part of a word)
patern | : patern we want to check (this patern should not begin with white caracters) |
Definition at line 510 of file PFileParser.cpp.
References PString::find(), isMatch(), p_currentChar, p_fileContent, p_nbTotalChar, popPosition(), and pushPosition().
Referenced by isMatchToken(), PMultiFileParser::isMatchToken(), testPFileParserMapIsMatchToken(), and testPFileParserVecIsMatchToken().
PString PFileParser::isMatchToken | ( | const PVecString & | patern | ) |
Check the matching between the current caracters and all the string in the vector but treats the string as a token (cannot be part of a word)
patern | : vector of the patern we want to check |
Definition at line 550 of file PFileParser.cpp.
References isMatchToken().
bool PFileParser::isMatchToken | ( | PString & | matchKey, |
T & | matchValue, | ||
const std::map< PString, T > & | patern | ||
) |
Check if one key of the map, matches the current token.
[out] | matchKey | : matching key (on success) |
[out] | matchValue | : matching value (on success) |
patern | : map of patterns to be checked |
Definition at line 19 of file PFileParser_impl.h.
References isMatchToken().
bool PFileParser::isWhiteSpace | ( | ) |
Says if the current char is a white space.
Definition at line 621 of file PFileParser.cpp.
References PString::find(), incrementCurrentChar(), isEndOfFile(), p_currentChar, p_fileContent, and p_listWhiteSpace.
Referenced by testPFileParserVecVecIsMatch().
bool PFileParser::open | ( | const PPath & | fileName | ) |
Fonction qui ouvre le fichier que l'on va parser.
fileName | : nom du fichier à ouvrir |
Definition at line 24 of file PFileParser.cpp.
References PPath::loadFileContent(), p_fileContent, p_fileName, and p_nbTotalChar.
Referenced by PMultiFileParser::load(), and DicoValue::load().
void PFileParser::popPosition | ( | ) |
Get to the last saved position of the PFileParser in the current file.
Definition at line 99 of file PFileParser.cpp.
References p_currentChar, p_currentLine, p_vecLine, and p_vecPosition.
Referenced by isMatch(), isMatchRewind(), isMatchSeq(), isMatchToken(), and testPFileParserBase().
void PFileParser::pushPosition | ( | ) |
Remember the current position of the PFileParser in the current file.
Definition at line 93 of file PFileParser.cpp.
References p_currentChar, p_currentLine, p_vecLine, and p_vecPosition.
Referenced by isMatch(), isMatchRewind(), isMatchSeq(), and isMatchToken().
void PFileParser::setColumn | ( | size_t | currentCol | ) |
Set the current column of the PFileParser.
currentCol | : current column of the PFileParser |
Definition at line 81 of file PFileParser.cpp.
References p_currentLineFirstColumn.
Referenced by setLocation(), and testPFileParserBase().
void PFileParser::setEscapeChar | ( | char | escapeChar | ) |
Sets the escape character of the PFileParser.
escapeChar | : escape character of the PFileParser |
Definition at line 58 of file PFileParser.cpp.
References p_echapChar.
Referenced by DicoValue::loadParser().
void PFileParser::setFileContent | ( | const PString & | fileContent | ) |
Set the file content.
fileContent | : file content |
Definition at line 50 of file PFileParser.cpp.
References p_fileContent, and p_nbTotalChar.
Referenced by checkParser(), checkParseSeq(), createNestedCallFromStr(), dico_create_nested_call(), DicoValue::fromString(), pxml_setXmlParser(), PMultiFileParser::setFileContent(), testPFileParserBase(), testPFileParserGetCurrentRow(), testPFileParserGetNextToken(), testPFileParserGetNextToken2(), testPFileParserGetUntilKey(), testPFileParserIsMatch(), testPFileParserMapIsMatchToken(), testPFileParserMatchSeq(), testPFileParserPartern(), testPFileParserParternExclude(), testPFileParserParternRecurse(), testPFileParserParternRecurse2(), testPFileParserParternRecurseAllowChar(), testPFileParserParternRecurseExcludeEnd(), testPFileParserParternRecurseExcludeEnd2(), testPFileParserSeq(), testPFileParserSeqOneStep(), testPFileParserVecIsMatch(), testPFileParserVecIsMatchToken(), and testPFileParserVecVecIsMatch().
void PFileParser::setLine | ( | size_t | currentLine | ) |
Set the current line of the PFileParser.
currentLine | : current line of the PFileParser |
Definition at line 74 of file PFileParser.cpp.
References p_currentLine.
Referenced by setLocation(), and testPFileParserBase().
void PFileParser::setLocation | ( | const PLocation & | location | ) |
Set the current location of the PFileParser.
location | : current location of the PFileParser |
Definition at line 65 of file PFileParser.cpp.
References PLocation::getColumn(), PLocation::getFileName(), PLocation::getLine(), p_fileName, setColumn(), and setLine().
Referenced by testPFileParserBase().
void PFileParser::setSeparator | ( | const PString & | separator | ) |
Initialise la liste des caractères séparateurs.
separator | : liste des caractères séparateurs Se sont les caractères que l'on ne prend en compte un par un |
Definition at line 43 of file PFileParser.cpp.
References p_listSeparator.
Referenced by DicoValue::loadParser(), ConfigParser::preLoadFile(), pxml_parserXmlContent(), pxml_setXmlParser(), testPFileParserBase(), testPFileParserGetNextToken(), and testPFileParserGetNextToken2().
void PFileParser::setWhiteSpace | ( | const PString & | whiteSpace | ) |
Initialise la liste des caractères blancs.
whiteSpace | : liste des caractères blancs Se sont les caractères que l'on ne prend jamais en compte |
Definition at line 35 of file PFileParser.cpp.
References p_listWhiteSpace.
Referenced by DicoValue::loadParser(), ConfigParser::preLoadFile(), pxml_parserXmlAttribute(), pxml_parserXmlContent(), pxml_setXmlParser(), testPFileParserBase(), testPFileParserGetNextToken(), and testPFileParserGetNextToken2().
void PFileParser::skipChars | ( | const PString & | chToSkip | ) |
Skip the characters in the given string.
chToSkip | : set of characters tb skip |
Definition at line 644 of file PFileParser.cpp.
References PString::find(), incrementCurrentChar(), isEndOfFile(), p_currentChar, and p_fileContent.
Referenced by getStrComposedOf().
void PFileParser::skipWhiteSpace | ( | ) |
Skip the white space if there is at the current caracter position.
Definition at line 632 of file PFileParser.cpp.
References PString::find(), incrementCurrentChar(), isEndOfFile(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_listWhiteSpace.
Referenced by isMatch(), DicoValue::loadParser(), DicoValue::parseDicoValue(), and ConfigParser::parseFile().
|
friend |
Définition de l'opérateur de flux sortant.
out | : flux dans lequel il faut écrire |
other | : PFileParser |
Definition at line 741 of file PFileParser.cpp.
|
private |
Numéro du caractère courant.
Definition at line 101 of file PFileParser.h.
Referenced by getColumn(), getCurrentCh(), getCurrentCharIdx(), getCurrentRow(), getLineIndentation(), getNextChar(), getNextToken(), getPrevCh(), getStrComposedOf(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), incrementCurrentChar(), incrementCurrentLine(), initialisationPFileParser(), isChSeparator(), isChSpace(), isEndOfFile(), isMatch(), isMatchToken(), isWhiteSpace(), popPosition(), pushPosition(), skipChars(), and skipWhiteSpace().
|
private |
Numéro de la ligne courante.
Definition at line 105 of file PFileParser.h.
Referenced by getLine(), getLocation(), getUntilKeyWithoutPatern(), incrementCurrentLine(), initialisationPFileParser(), popPosition(), pushPosition(), and setLine().
|
private |
Number of the first column caracter of the current line.
Definition at line 107 of file PFileParser.h.
Referenced by getColumn(), getLineIndentation(), incrementCurrentLine(), initialisationPFileParser(), and setColumn().
|
private |
Say if we don't want to skip the spaces.
Definition at line 119 of file PFileParser.h.
Referenced by getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), initialisationPFileParser(), and skipWhiteSpace().
|
private |
Echap caracter.
Definition at line 113 of file PFileParser.h.
Referenced by getEscapeChar(), incrementCurrentChar(), initialisationPFileParser(), and setEscapeChar().
|
private |
Contenu du fichier de configuration.
Definition at line 99 of file PFileParser.h.
Referenced by getCurrentCh(), getCurrentRow(), getLineIndentation(), getNextChar(), getNextToken(), getPrevCh(), getStrComposedOf(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), incrementCurrentChar(), initialisationPFileParser(), isChSeparator(), isChSpace(), isMatch(), isMatchToken(), isWhiteSpace(), open(), setFileContent(), skipChars(), and skipWhiteSpace().
|
private |
Nom du fichier que l'on veut parser.
Definition at line 97 of file PFileParser.h.
Referenced by getFileName(), getLocation(), open(), and setLocation().
|
private |
liste des séparateurs
Definition at line 111 of file PFileParser.h.
Referenced by getNextToken(), getSeparator(), initialisationPFileParser(), isChSeparator(), and setSeparator().
|
private |
liste des espaces blancs
Definition at line 109 of file PFileParser.h.
Referenced by getNextToken(), getStrComposedOf(), getWhiteSpace(), initialisationPFileParser(), isChSpace(), isWhiteSpace(), setWhiteSpace(), and skipWhiteSpace().
|
private |
Nombre de caractères total.
Definition at line 103 of file PFileParser.h.
Referenced by getLineIndentation(), getNbTotalChar(), getNextChar(), getUntilKey(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), incrementCurrentChar(), isEndOfFile(), isMatch(), isMatchToken(), open(), and setFileContent().
|
private |
Vector of all the checkpoint rows in the text file (added with pushPosition() and removed with popPosition() or clear()
Definition at line 117 of file PFileParser.h.
Referenced by clear(), popPosition(), and pushPosition().
|
private |
Vector of all the checkpoint positions in the text file (added with pushPosition() and removed with popPosition() or clear()
Definition at line 115 of file PFileParser.h.
Referenced by clear(), popPosition(), and pushPosition().