Syntax checker implemented by recursive descending method. More...
#include <labelSyntaxChecker.h>
Syntax checker implemented by recursive descending method.
Computes characters and gives pattern used in label text. If fails, report is available.
characterList | (created by StringProcessor) |
Definition at line 14 of file labelSyntaxChecker.h.
eEmptyPattern | |
eNormalPattern | |
eAlphabetMinusPattern | |
eBarPattern | |
eAlphabetPattern | |
eEpsilonSymbPattern |
Definition at line 17 of file labelSyntaxChecker.h.
LabelSyntaxChecker::LabelSyntaxChecker | ( | const ITransition::TCharSet & | alphabet, | |
const QString & | alphabetSymb, | |||
const QString & | epsilonSymb | |||
) |
Definition at line 6 of file labelSyntaxChecker.cpp.
LabelSyntaxChecker::~LabelSyntaxChecker | ( | ) | [inline] |
Definition at line 28 of file labelSyntaxChecker.h.
bool LabelSyntaxChecker::AlphabetOrAlphabetMinusPattern | ( | ) | [protected] |
Definition at line 228 of file labelSyntaxChecker.cpp.
References StringProcessor::CharacterInfo::character, characters, End(), hasNextToken(), nextToken(), NormalPattern(), pattern, and report.
Referenced by checkSyntax().
bool LabelSyntaxChecker::BarPattern | ( | ) | [protected] |
Definition at line 185 of file labelSyntaxChecker.cpp.
References BarPatternNext(), characters, hasNextToken(), nextToken(), processBarredCharacter(), and report.
Referenced by checkSyntax().
bool LabelSyntaxChecker::BarPatternNext | ( | ) | [protected] |
Definition at line 201 of file labelSyntaxChecker.cpp.
References StringProcessor::CharacterInfo::character, characters, hasNextToken(), nextToken(), processBarredCharacter(), and report.
Referenced by BarPattern().
bool LabelSyntaxChecker::checkSyntax | ( | const StringProcessor::TCharacterList & | characterList | ) |
starts recursive descent
Definition at line 83 of file labelSyntaxChecker.cpp.
References AlphabetOrAlphabetMinusPattern(), BarPattern(), StringProcessor::CharacterInfo::character, characters, StringProcessor::eBar, End(), hasNextToken(), m_alphabet, m_alphabetSymb, m_characterList, m_epsilonSymb, m_idx, StringProcessor::CharacterInfo::modifier, nextToken(), NormalPattern(), pattern, and report.
Referenced by Transition::getCharacters().
bool LabelSyntaxChecker::End | ( | ) | [protected] |
Definition at line 289 of file labelSyntaxChecker.cpp.
References hasNextToken(), and report.
Referenced by AlphabetOrAlphabetMinusPattern(), and checkSyntax().
ITransition::TCharSet LabelSyntaxChecker::getCharacters | ( | ) |
Definition at line 22 of file labelSyntaxChecker.cpp.
References characters.
Referenced by Transition::getCharacters().
LabelSyntaxChecker::ELabelTextPattern LabelSyntaxChecker::getPattern | ( | ) |
Definition at line 27 of file labelSyntaxChecker.cpp.
References pattern.
Referenced by Transition::getCharacters().
QString LabelSyntaxChecker::getReport | ( | ) |
Definition at line 17 of file labelSyntaxChecker.cpp.
References report.
Referenced by Transition::getCharacters().
bool LabelSyntaxChecker::hasNextToken | ( | ) | [protected] |
Definition at line 38 of file labelSyntaxChecker.cpp.
References m_characterList, and m_idx.
Referenced by AlphabetOrAlphabetMinusPattern(), BarPattern(), BarPatternNext(), checkSyntax(), End(), NormalPattern(), and NormalPatternNext().
StringProcessor::CharacterInfo LabelSyntaxChecker::nextToken | ( | ) | [protected] |
return next CharacterInfo from input list and
Definition at line 32 of file labelSyntaxChecker.cpp.
References m_characterList, and m_idx.
Referenced by AlphabetOrAlphabetMinusPattern(), BarPattern(), BarPatternNext(), checkSyntax(), NormalPattern(), and NormalPatternNext().
bool LabelSyntaxChecker::NormalPattern | ( | ITransition::TCharSet & | charSet | ) | [protected] |
recursive descent methods
Definition at line 142 of file labelSyntaxChecker.cpp.
References hasNextToken(), nextToken(), NormalPatternNext(), processCharacter(), and report.
Referenced by AlphabetOrAlphabetMinusPattern(), and checkSyntax().
bool LabelSyntaxChecker::NormalPatternNext | ( | ITransition::TCharSet & | charSet | ) | [protected] |
Definition at line 158 of file labelSyntaxChecker.cpp.
References StringProcessor::CharacterInfo::character, hasNextToken(), m_idx, nextToken(), processCharacter(), and report.
Referenced by NormalPattern().
bool LabelSyntaxChecker::processBarredCharacter | ( | ITransition::TCharSet & | charSet, | |
const StringProcessor::CharacterInfo & | charInfo | |||
) | [protected] |
adds barred character to charSet and check if it's in alphabet
Definition at line 62 of file labelSyntaxChecker.cpp.
References StringProcessor::CharacterInfo::character, StringProcessor::eBar, StringProcessor::eOverline, m_alphabet, StringProcessor::CharacterInfo::modifier, and report.
Referenced by BarPattern(), and BarPatternNext().
bool LabelSyntaxChecker::processCharacter | ( | ITransition::TCharSet & | charSet, | |
const StringProcessor::CharacterInfo & | charInfo | |||
) | [protected] |
adds character to charSet and check if it's in alphabet
Definition at line 43 of file labelSyntaxChecker.cpp.
References StringProcessor::CharacterInfo::character, StringProcessor::eBar, StringProcessor::eOverline, m_alphabet, StringProcessor::CharacterInfo::modifier, and report.
Referenced by NormalPattern(), and NormalPatternNext().
ITransition::TCharSet LabelSyntaxChecker::characters [protected] |
Definition at line 48 of file labelSyntaxChecker.h.
Referenced by AlphabetOrAlphabetMinusPattern(), BarPattern(), BarPatternNext(), checkSyntax(), and getCharacters().
const ITransition::TCharSet LabelSyntaxChecker::m_alphabet [protected] |
Definition at line 42 of file labelSyntaxChecker.h.
Referenced by checkSyntax(), processBarredCharacter(), and processCharacter().
const QString LabelSyntaxChecker::m_alphabetSymb [protected] |
Definition at line 43 of file labelSyntaxChecker.h.
Referenced by checkSyntax().
Definition at line 45 of file labelSyntaxChecker.h.
Referenced by checkSyntax(), hasNextToken(), and nextToken().
const QString LabelSyntaxChecker::m_epsilonSymb [protected] |
Definition at line 44 of file labelSyntaxChecker.h.
Referenced by checkSyntax().
int LabelSyntaxChecker::m_idx [protected] |
Definition at line 46 of file labelSyntaxChecker.h.
Referenced by checkSyntax(), hasNextToken(), nextToken(), and NormalPatternNext().
ELabelTextPattern LabelSyntaxChecker::pattern [protected] |
Definition at line 49 of file labelSyntaxChecker.h.
Referenced by AlphabetOrAlphabetMinusPattern(), checkSyntax(), and getPattern().
QStringList LabelSyntaxChecker::report [protected] |
Definition at line 50 of file labelSyntaxChecker.h.
Referenced by AlphabetOrAlphabetMinusPattern(), BarPattern(), BarPatternNext(), checkSyntax(), End(), getReport(), NormalPattern(), NormalPatternNext(), processBarredCharacter(), and processCharacter().