![]() |
|
PhoenixFileParser
1.5.1
Set of tools to ease file parsing
|
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 | clearPosition () |
| Clear the save position of the parser in ther current file. | |
| char | getChar (size_t index) const |
| Get the char at the given index. | |
| size_t | getColumn () const |
| Fonction qui renvoie le numéro de la colonne du caractère courant. | |
| char | getCurrentCh () const |
| Renvoie le caractère courant. | |
| size_t | getCurrentCharIdx () const |
| Return the index of the current character. | |
| PString | getCurrentRow () const |
| Get the current parsed row. | |
| char | getEscapeChar () const |
| Gets the escape character of the PFileParser. | |
| PPath | getFileName () const |
| Fonction qui renvoie le nom du fichier que l'on a ouvert. | |
| size_t | getLine () const |
| Fonction qui renvoie le numéro de la ligne courante. | |
| size_t | getLineIndentation () |
| Get the current line indentation. | |
| PLocation | getLocation () const |
| Fonction qui renvoie la PLocation du PFileParser. | |
| size_t | getNbTotalChar () const |
| Return the number of characters in the current opened file. | |
| char | getNextChar () |
| Fonction qui renvoie le prochain caractère du fichier courant. | |
| PString | getNextToken () |
| Get the next token. | |
| PString | getNextToken (PString &skippedStr) |
| Get the next token and return also the skipped characters until the next token. | |
| char | getPrevCh () const |
| Renvoie le caractère courant. | |
| PString | getSeparator () const |
| renvoie la liste des caractères séparateurs | |
| PString | getStrComposedOf (const PString &charset) |
| Get string composed of the characters in the string charset. | |
| PString | getUntilKey (const PString &patern) |
| Renvoie la chaine de caractère du caractère courant jusqu'à patern comprise. | |
| PString | getUntilKeyWithoutPatern (const PString &patern) |
| Renvoie la chaine de caractère du caractère courant jusqu'à patern exclu. | |
| PString | getUntilKeyWithoutPaternExclude (const PString &patern, const PString &strNotBeforeEndPatern) |
| Parse a string until the patern is found, only if it has not strNotBeforeEndPatern before it. | |
| PString | getUntilKeyWithoutPaternRecurse (const PString &patern, const PString &beginPatern) |
| Get the string until end sequence and take account recursive patern (embeded strings) | |
| PString | getUntilKeyWithoutPaternRecurse (const PString &patern, const PString &beginPatern, const PString &allowedCharAfterBegin) |
| Get the string until end sequence and take account recursive patern (embeded strings) | |
| PString | getUntilKeyWithoutPaternRecurseExclude (const PString &patern, const PString &beginPatern, const PString &echapExpr) |
| Get the string until end sequence and take account recursive patern (embeded strings) | |
| PString | getWhiteSpace () const |
| renvoie la liste des caractères blancs | |
| void | incrementCurrentChar (size_t nbChar=1lu) |
| Increment the current caracter. | |
| bool | isChSeparator () const |
| Dis si le caractère courant est un séparateur. | |
| bool | isChSpace () const |
| Dis si le caractère courant est un caractère blanc. | |
| bool | isEndOfFile () const |
| Dit si on est à la fin du fichier. | |
| PString | isMatch (const PParseSeq &seq) |
| Check the matching of a sequence in the current file. | |
| bool | isMatch (const PString &patern) |
| Says if the patern match with the current caracters of the PFileParser. | |
| bool | isMatch (const PString &patern, const PString &forbiddenCharBefore) |
| Says if the patern match with the current caracters of the PFileParser. | |
| PString | isMatch (const PVecString &patern) |
| Check the matching between the current caracters and all the string in the vector. | |
| 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. | |
| bool | isMatchRewind (const PString &patern) |
| Do a isMatch and then go back at the previous position. | |
| bool | isMatchSeq (const PVecString &patern, bool alwaysPopBack=false) |
| Match a sequence of token in a vector. | |
| 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) | |
| 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) | |
| 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. | |
| bool | isWhiteSpace () |
| Says if the current char is a white space. | |
| bool | open (const PPath &fileName) |
| Fonction qui ouvre le fichier que l'on va parser. | |
| PFileParser () | |
| Constructeur de PFileParser. | |
| void | popPosition () |
| Get to the last saved position of the PFileParser in the current file. | |
| void | pushPosition () |
| Remember the current position of the PFileParser in the current file. | |
| void | setColumn (size_t currentCol) |
| Set the current column of the PFileParser. | |
| void | setCurrentCharIdx (size_t index) |
| Set the index of the current char. | |
| void | setEscapeChar (char escapeChar) |
| Sets the escape character of the PFileParser. | |
| void | setFileContent (const PString &fileContent) |
| Set the file content. | |
| void | setLine (size_t currentLine) |
| Set the current line of the PFileParser. | |
| void | setLocation (const PLocation &location) |
| Set the current location of the PFileParser. | |
| void | setSeparator (const PString &separator) |
| Initialise la liste des caractères séparateurs. | |
| void | setWhiteSpace (const PString &whiteSpace) |
| Initialise la liste des caractères blancs. | |
| void | skipChars (const PString &chToSkip) |
| Skip the characters in the given string. | |
| void | skipWhiteSpace () |
| Skip the white space if there is at the current caracter position. | |
| virtual | ~PFileParser () |
| Destructeur de PFileParser. | |
Private Member Functions | |
| void | incrementCurrentLine () |
| Increment the current line. | |
| void | initialisationPFileParser () |
| Fonction d'initialisation du PFileParser. | |
Private Attributes | |
| size_t | p_currentChar |
| Numéro du caractère courant. | |
| bool | p_currentCharEchaped |
| True if the current char is escaped. | |
| size_t | p_currentLine |
| Numéro de la ligne courante. | |
| size_t | p_currentLineFirstColumn |
| Number of the first column caracter of the current line. | |
| bool | p_dontSkipSpace |
| Say if we don't want to skip the spaces. | |
| char | p_echapChar |
| Echap caracter. | |
| PString | p_fileContent |
| Contenu du fichier de configuration. | |
| PPath | p_fileName |
| Nom du fichier que l'on veut parser. | |
| PString | p_listSeparator |
| liste des séparateurs | |
| PString | p_listWhiteSpace |
| liste des espaces blancs | |
| size_t | p_nbTotalChar |
| Nombre de caractères total. | |
| 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() | |
| 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() | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const PFileParser &other) |
| Définition de l'opérateur de flux sortant. | |
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().
Referenced by operator<<.
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
| void PFileParser::clearPosition | ( | ) |
Clear the save position of the parser in ther current file.
Definition at line 117 of file PFileParser.cpp.
References p_vecLine, and p_vecPosition.
Referenced by parser_json_value().
Here is the caller graph for this function:| char PFileParser::getChar | ( | size_t | index | ) | const |
Get the char at the given index.
| index | : index of the char to get |
Definition at line 693 of file PFileParser.cpp.
References p_fileContent, and p_nbTotalChar.
Referenced by PHighlightParser::makeHighlighting().
Here is the caller graph for this function:| size_t PFileParser::getColumn | ( | ) | const |
Fonction qui renvoie le numéro de la colonne du caractère courant.
Definition at line 708 of file PFileParser.cpp.
References p_currentChar, and p_currentLineFirstColumn.
Referenced by getLocation(), and operator<<.
Here is the caller graph for this function:| char PFileParser::getCurrentCh | ( | ) | const |
Renvoie le caractère courant.
Definition at line 676 of file PFileParser.cpp.
References isEndOfFile(), p_currentChar, and p_fileContent.
Referenced by PHighlightParser::makeHighlighting().
Here is the call graph for this function:
Here is the caller graph for this function:| size_t PFileParser::getCurrentCharIdx | ( | ) | const |
Return the index of the current character.
Definition at line 724 of file PFileParser.cpp.
References p_currentChar.
Referenced by PHighlightParser::makeHighlighting().
Here is the caller graph for this function:| PString PFileParser::getCurrentRow | ( | ) | const |
Get the current parsed row.
Definition at line 422 of file PFileParser.cpp.
References isEndOfFile(), p_currentChar, and p_fileContent.
Here is the call graph for this function:| char PFileParser::getEscapeChar | ( | ) | const |
Gets the escape character of the PFileParser.
Definition at line 141 of file PFileParser.cpp.
References p_echapChar.
| PPath PFileParser::getFileName | ( | ) | const |
Fonction qui renvoie le nom du fichier que l'on a ouvert.
Definition at line 148 of file PFileParser.cpp.
References p_fileName.
Referenced by operator<<.
Here is the caller graph for this function:| size_t PFileParser::getLine | ( | ) | const |
Fonction qui renvoie le numéro de la ligne courante.
Definition at line 701 of file PFileParser.cpp.
References p_currentLine.
Referenced by operator<<.
Here is the caller graph for this function:| size_t PFileParser::getLineIndentation | ( | ) |
Get the current line indentation.
Definition at line 731 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 748 of file PFileParser.cpp.
References getColumn(), p_currentLine, and p_fileName.
Referenced by DicoValue::errorAt(), parser_json_fileParser(), parser_json_key(), parser_json_list(), parser_json_map(), parser_json_value(), and parser_jsonErrorAt().
Here is the call graph for this function:
Here is the caller graph for this function:| size_t PFileParser::getNbTotalChar | ( | ) | const |
Return the number of characters in the current opened file.
Definition at line 717 of file PFileParser.cpp.
References p_nbTotalChar.
Referenced by PHighlightParser::makeHighlighting().
Here is the caller graph for this function:| char PFileParser::getNextChar | ( | ) |
Fonction qui renvoie le prochain caractère du fichier courant.
Definition at line 194 of file PFileParser.cpp.
References incrementCurrentChar(), p_currentChar, p_fileContent, and p_nbTotalChar.
Here is the call graph for this function:| PString PFileParser::getNextToken | ( | ) |
Get the next token.
Definition at line 155 of file PFileParser.cpp.
References getNextToken().
Referenced by DicoValue::errorAt(), getNextToken(), and parser_jsonErrorAt().
Here is the call graph for this function:
Here is the caller graph for this function:| PString PFileParser::getNextToken | ( | PString & | skippedStr | ) |
Get the next token and return also the skipped characters until the next token.
| [out] | skippedStr | : string of skipped characters |
Definition at line 164 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, p_fileContent, p_listSeparator, and p_listWhiteSpace.
Here is the call graph for this function:| char PFileParser::getPrevCh | ( | ) | const |
Renvoie le caractère courant.
Definition at line 684 of file PFileParser.cpp.
References isEndOfFile(), p_currentChar, and p_fileContent.
Here is the call graph for this function:| PString PFileParser::getSeparator | ( | ) | const |
renvoie la liste des caractères séparateurs
Definition at line 669 of file PFileParser.cpp.
References p_listSeparator.
| PString PFileParser::getStrComposedOf | ( | const PString & | charset | ) |
Get string composed of the characters in the string charset.
| charset | : set of the available characters to get the current string |
Definition at line 401 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, p_fileContent, p_listWhiteSpace, and skipChars().
Referenced by isMatch(), DicoValue::parseDicoValue(), parser_json_fileParser(), and parser_json_value().
Here is the call graph for this function:
Here is the caller graph for this function:| PString PFileParser::getUntilKey | ( | const PString & | patern | ) |
Renvoie la chaine de caractère du caractère courant jusqu'à patern comprise.
| patern | : séquence d'arrêt |
Definition at line 209 of file PFileParser.cpp.
References getUntilKeyWithoutPatern(), isEndOfFile(), and p_nbTotalChar.
Referenced by parse_generic_string(), and parser_jsonString().
Here is the call graph for this function:
Here is the caller graph for this function:| PString PFileParser::getUntilKeyWithoutPatern | ( | const PString & | patern | ) |
Renvoie la chaine de caractère du caractère courant jusqu'à patern exclu.
| patern | : séquence d'arrêt |
Definition at line 218 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, p_currentCharEchaped, p_currentLine, p_fileContent, and p_nbTotalChar.
Referenced by createNestedCallFromStr(), dico_create_nested_call(), PHighlightParser::doReplaceAction(), getUntilKey(), and DicoValue::parseString().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 258 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), isMatch(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_nbTotalChar.
Here is the call graph for this function:| 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 369 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), isMatch(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_nbTotalChar.
Here is the call graph for this function:| 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 290 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), isMatch(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_nbTotalChar.
Here is the call graph for this function:| 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 327 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), isMatch(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_nbTotalChar.
Here is the call graph for this function:| PString PFileParser::getWhiteSpace | ( | ) | const |
renvoie la liste des caractères blancs
Definition at line 662 of file PFileParser.cpp.
References p_listWhiteSpace.
| void PFileParser::incrementCurrentChar | ( | size_t | nbChar = 1lu | ) |
Increment the current caracter.
| nbChar | : number of char to go ahead |
Definition at line 784 of file PFileParser.cpp.
References incrementCurrentLine(), p_currentChar, p_currentCharEchaped, p_echapChar, p_fileContent, and p_nbTotalChar.
Referenced by PHighlightParser::doReplaceAction(), getNextChar(), getNextToken(), getStrComposedOf(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), isMatch(), isWhiteSpace(), PHighlightParser::makeHighlighting(), skipChars(), and skipWhiteSpace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Increment the current line.
Definition at line 776 of file PFileParser.cpp.
References p_currentChar, p_currentLine, and p_currentLineFirstColumn.
Referenced by incrementCurrentChar().
Here is the caller graph for this function:
|
private |
Fonction d'initialisation du PFileParser.
Definition at line 763 of file PFileParser.cpp.
References p_currentChar, p_currentCharEchaped, p_currentLine, p_currentLineFirstColumn, p_dontSkipSpace, p_echapChar, p_fileContent, p_listSeparator, and p_listWhiteSpace.
Referenced by PFileParser().
Here is the caller graph for this function:| bool PFileParser::isChSeparator | ( | ) | const |
Dis si le caractère courant est un séparateur.
Definition at line 133 of file PFileParser.cpp.
References isEndOfFile(), p_currentChar, p_fileContent, and p_listSeparator.
Here is the call graph for this function:| bool PFileParser::isChSpace | ( | ) | const |
Dis si le caractère courant est un caractère blanc.
Definition at line 125 of file PFileParser.cpp.
References isEndOfFile(), p_currentChar, p_fileContent, and p_listWhiteSpace.
Here is the call graph for this function:| bool PFileParser::isEndOfFile | ( | ) | const |
Dit si on est à la fin du fichier.
Definition at line 95 of file PFileParser.cpp.
References p_currentChar, and p_nbTotalChar.
Referenced by createNestedCallFromStr(), dico_create_nested_call(), getCurrentCh(), getCurrentRow(), getNextToken(), getPrevCh(), getStrComposedOf(), getUntilKey(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), isChSeparator(), isChSpace(), isMatch(), isWhiteSpace(), DicoValue::loadParser(), PHighlightParser::makeHighlighting(), DicoValue::parseList(), DicoValue::parseListOrMap(), parser_json_fileParser(), parser_json_list(), parser_json_map(), skipChars(), and skipWhiteSpace().
Here is the caller graph for this function:| PString PFileParser::isMatch | ( | const PParseSeq & | seq | ) |
Check the matching of a sequence in the current file.
| seq | : sequence to be checked |
Definition at line 589 of file PFileParser.cpp.
References getStrComposedOf(), PParseSeq::getVecStep(), isMatch(), popPosition(), and pushPosition().
Here is the call graph for this function:| 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 448 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, p_currentCharEchaped, p_fileContent, p_nbTotalChar, and skipWhiteSpace().
Referenced by getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), isMatch(), isMatch(), isMatch(), isMatch(), isMatchRewind(), isMatchSeq(), isMatchToken(), parse_generic_string(), DicoValue::parseDicoValue(), DicoValue::parseList(), DicoValue::parseListOrMap(), parser_json_fileParser(), parser_json_key(), parser_json_list(), parser_json_map(), parser_jsonString(), and DicoValue::parseString().
Here is the call graph for this function:
Here is the caller graph for this function:| bool PFileParser::isMatch | ( | const PString & | patern, |
| const PString & | forbiddenCharBefore ) |
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 502 of file PFileParser.cpp.
References isMatch(), p_currentChar, and p_fileContent.
Here is the call graph for this function:| 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 543 of file PFileParser.cpp.
References isMatch().
Here is the call graph for this function:| 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 571 of file PFileParser.cpp.
References isMatch().
Here is the call graph for this function:| 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 470 of file PFileParser.cpp.
References isMatch(), popPosition(), and pushPosition().
Referenced by DicoValue::parseList(), DicoValue::parseListOrMap(), parser_json_fileParser(), parser_json_list(), parser_json_map(), and parser_json_value().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 482 of file PFileParser.cpp.
References isMatch(), popPosition(), and pushPosition().
Here is the call graph for this function:| 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 517 of file PFileParser.cpp.
References isMatch(), p_currentChar, p_fileContent, p_nbTotalChar, popPosition(), and pushPosition().
Referenced by isMatchToken(), and isMatchToken().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 557 of file PFileParser.cpp.
References isMatchToken().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| bool PFileParser::isWhiteSpace | ( | ) |
Says if the current char is a white space.
Definition at line 628 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, p_fileContent, and p_listWhiteSpace.
Here is the call graph for this function:| 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 p_fileContent, p_fileName, and p_nbTotalChar.
Referenced by DicoValue::load(), and parser_json().
Here is the caller graph for this function:| void PFileParser::popPosition | ( | ) |
Get to the last saved position of the PFileParser in the current file.
Definition at line 106 of file PFileParser.cpp.
References p_currentChar, p_currentLine, p_vecLine, and p_vecPosition.
Referenced by isMatch(), isMatchRewind(), isMatchSeq(), isMatchToken(), and parser_json_value().
Here is the caller graph for this function:| void PFileParser::pushPosition | ( | ) |
Remember the current position of the PFileParser in the current file.
Definition at line 100 of file PFileParser.cpp.
References p_currentChar, p_currentLine, p_vecLine, and p_vecPosition.
Referenced by isMatch(), isMatchRewind(), isMatchSeq(), isMatchToken(), and parser_json_value().
Here is the caller graph for this function:| void PFileParser::setColumn | ( | size_t | currentCol | ) |
Set the current column of the PFileParser.
| currentCol | : current column of the PFileParser |
Definition at line 88 of file PFileParser.cpp.
References p_currentLineFirstColumn.
Referenced by setLocation().
Here is the caller graph for this function:| void PFileParser::setCurrentCharIdx | ( | size_t | index | ) |
Set the index of the current char.
| index | : index of the current char |
Definition at line 74 of file PFileParser.cpp.
References p_currentChar.
Referenced by PHighlightParser::doReplaceAction(), and PHighlightParser::makeHighlighting().
Here is the caller graph for this function:| 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::fromString(), DicoValue::loadParser(), parser_json(), and parser_jsonString().
Here is the caller graph for this function:| 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 createNestedCallFromStr(), dico_create_nested_call(), DicoValue::fromString(), PHighlightParser::makeHighlighting(), and parser_jsonString().
Here is the caller graph for this function:| void PFileParser::setLine | ( | size_t | currentLine | ) |
Set the current line of the PFileParser.
| currentLine | : current line of the PFileParser |
Definition at line 81 of file PFileParser.cpp.
References p_currentLine.
Referenced by setLocation().
Here is the caller graph for this function:| 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().
Here is the call graph for this function:| 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(), parser_json(), and parser_jsonString().
Here is the caller graph for this function:| 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(), parser_json(), and parser_jsonString().
Here is the caller graph for this function:| void PFileParser::skipChars | ( | const PString & | chToSkip | ) |
Skip the characters in the given string.
| chToSkip | : set of characters tb skip |
Definition at line 651 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, and p_fileContent.
Referenced by getStrComposedOf().
Here is the call graph for this function:
Here is the caller graph for this function:| void PFileParser::skipWhiteSpace | ( | ) |
Skip the white space if there is at the current caracter position.
Definition at line 639 of file PFileParser.cpp.
References incrementCurrentChar(), isEndOfFile(), p_currentChar, p_dontSkipSpace, p_fileContent, and p_listWhiteSpace.
Referenced by isMatch(), DicoValue::loadParser(), and DicoValue::parseDicoValue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
Définition de l'opérateur de flux sortant.
| out | : flux dans lequel il faut écrire |
| other | : PFileParser |
Definition at line 757 of file PFileParser.cpp.
References getColumn(), getFileName(), getLine(), and PFileParser().
|
private |
Numéro du caractère courant.
Definition at line 103 of file PFileParser.h.
Referenced by getColumn(), getCurrentCh(), getCurrentCharIdx(), getCurrentRow(), getLineIndentation(), getNextChar(), getNextToken(), getPrevCh(), getStrComposedOf(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), incrementCurrentChar(), incrementCurrentLine(), initialisationPFileParser(), isChSeparator(), isChSpace(), isEndOfFile(), isMatch(), isMatch(), isMatchToken(), isWhiteSpace(), popPosition(), pushPosition(), setCurrentCharIdx(), skipChars(), and skipWhiteSpace().
|
private |
True if the current char is escaped.
Definition at line 123 of file PFileParser.h.
Referenced by getUntilKeyWithoutPatern(), incrementCurrentChar(), initialisationPFileParser(), and isMatch().
|
private |
Numéro de la ligne courante.
Definition at line 107 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 109 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 121 of file PFileParser.h.
Referenced by getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), initialisationPFileParser(), and skipWhiteSpace().
|
private |
Echap caracter.
Definition at line 115 of file PFileParser.h.
Referenced by getEscapeChar(), incrementCurrentChar(), initialisationPFileParser(), and setEscapeChar().
|
private |
Contenu du fichier de configuration.
Definition at line 101 of file PFileParser.h.
Referenced by getChar(), getCurrentCh(), getCurrentRow(), getLineIndentation(), getNextChar(), getNextToken(), getPrevCh(), getStrComposedOf(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurse(), getUntilKeyWithoutPaternRecurseExclude(), incrementCurrentChar(), initialisationPFileParser(), isChSeparator(), isChSpace(), isMatch(), isMatch(), isMatchToken(), isWhiteSpace(), open(), setFileContent(), skipChars(), and skipWhiteSpace().
|
private |
Nom du fichier que l'on veut parser.
Definition at line 99 of file PFileParser.h.
Referenced by getFileName(), getLocation(), open(), and setLocation().
|
private |
liste des séparateurs
Definition at line 113 of file PFileParser.h.
Referenced by getNextToken(), getSeparator(), initialisationPFileParser(), isChSeparator(), and setSeparator().
|
private |
liste des espaces blancs
Definition at line 111 of file PFileParser.h.
Referenced by getNextToken(), getStrComposedOf(), getWhiteSpace(), initialisationPFileParser(), isChSpace(), isWhiteSpace(), setWhiteSpace(), and skipWhiteSpace().
|
private |
Nombre de caractères total.
Definition at line 105 of file PFileParser.h.
Referenced by getChar(), getLineIndentation(), getNbTotalChar(), getNextChar(), getUntilKey(), getUntilKeyWithoutPatern(), getUntilKeyWithoutPaternExclude(), getUntilKeyWithoutPaternRecurse(), 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 119 of file PFileParser.h.
Referenced by clearPosition(), 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 117 of file PFileParser.h.
Referenced by clearPosition(), popPosition(), and pushPosition().