#include <MStringParser.hh>
|
| char | peek () |
| |
| char | next () |
| |
| bool | atEnd () |
| |
| bool | atEndOfLine () |
| |
| Location | here () const |
| |
| void | skipBlanks () |
| |
| void | skipEmptyLines () |
| |
| void | expectEndOfLine () |
| |
| std::string | readWhile (bool(*accept)(char)) |
| |
| std::string | readIdentifier () |
| |
| std::string | requireIdentifier (const std::string &what) |
| |
| std::string | requireWord (bool(*accept)(char), const std::string &what) |
| |
| std::string | readQualifiedName (const std::string &what) |
| |
| std::string | readRestOfLine () |
| |
| std::string | readKeyword () |
| |
| void | error (const std::string &message, Location location) |
| |
| void | error (const std::string &message) |
| |
| void | warning (const std::string &message, Location location) |
| |
| void | directive () |
| |
| void | languageDirective () |
| |
| void | charsetDirective () |
| |
| void | classDirective (ClassConcept &concept, const std::string &directive, bool exception) |
| |
| void | functionDirective (FunctionConcept &concept, const std::string &directive) |
| |
| void | errorDirective () |
| |
| void | syslogDirective () |
| |
| void | includeDirective () |
| |
| void | importDirective () |
| |
| void | usingDirective () |
| |
| void | namespaceDirective () |
| |
| void | moduleDirective () |
| |
| void | messageDirective () |
| |
| bool | commonOption (Concept &concept, const std::string &option) |
| |
| bool | classOption (ClassConcept &concept, const std::string &option) |
| |
| bool | functionOption (FunctionConcept &concept, const std::string &option, Location location) |
| |
| void | unknownOption (const std::string &option, const std::string &directive, Location location) |
| |
| void | messageLine () |
| |
| void | parameterLine () |
| |
| void | setHeaderLine () |
| |
| void | quotedTextLine (char quote) |
| |
| void | barTextLine () |
| |
| void | escapeSequence (std::string &text) |
| |
| void | macro (LocaleMessage &locale, Location open) |
| |
| LocaleMessage & | currentLocale () |
| |
| Message & | currentMessage () |
| |
| std::string | resolveImport (const std::string &filename) const |
| |
| void | closeMessage () |
| |
◆ MStringParser()
◆ getGrammarName()
| std::string MStringParser::getGrammarName |
( |
| ) |
const |
|
overridenoexcept |
◆ parseFile()
| bool MStringParser::parseFile |
( |
const std::string & |
path | ) |
|
◆ parseStream()
| bool MStringParser::parseStream |
( |
const std::string & |
name, |
|
|
std::istream & |
input |
|
) |
| |
◆ start()
| bool MStringParser::start |
( |
| ) |
|
|
overrideprotected |
◆ skipComments()
| bool MStringParser::skipComments |
( |
| ) |
|
|
overrideprotected |
◆ peek()
| char MStringParser::peek |
( |
| ) |
|
|
private |
Referenced by atEnd(), atEndOfLine(), barTextLine(), classOption(), escapeSequence(), expectEndOfLine(), importDirective(), includeDirective(), macro(), messageDirective(), messageLine(), quotedTextLine(), readIdentifier(), readQualifiedName(), readWhile(), requireIdentifier(), requireWord(), setHeaderLine(), skipBlanks(), skipComments(), skipEmptyLines(), start(), and unknownOption().
◆ next()
| char MStringParser::next |
( |
| ) |
|
|
private |
References _Last.
Referenced by barTextLine(), classOption(), directive(), escapeSequence(), expectEndOfLine(), importDirective(), includeDirective(), macro(), messageDirective(), parameterLine(), quotedTextLine(), readQualifiedName(), readRestOfLine(), readWhile(), setHeaderLine(), skipBlanks(), skipComments(), and skipEmptyLines().
◆ atEnd()
| bool MStringParser::atEnd |
( |
| ) |
|
|
private |
◆ atEndOfLine()
| bool MStringParser::atEndOfLine |
( |
| ) |
|
|
private |
◆ here()
References _Last.
Referenced by barTextLine(), charsetDirective(), classDirective(), classOption(), commonOption(), directive(), error(), errorDirective(), functionDirective(), functionOption(), importDirective(), includeDirective(), messageDirective(), moduleDirective(), parameterLine(), quotedTextLine(), readQualifiedName(), requireIdentifier(), requireWord(), setHeaderLine(), syslogDirective(), and usingDirective().
◆ skipBlanks()
| void MStringParser::skipBlanks |
( |
| ) |
|
|
private |
References next(), and peek().
Referenced by charsetDirective(), classDirective(), classOption(), directive(), errorDirective(), expectEndOfLine(), functionDirective(), importDirective(), includeDirective(), messageDirective(), moduleDirective(), namespaceDirective(), parameterLine(), readKeyword(), readQualifiedName(), requireIdentifier(), requireWord(), setHeaderLine(), skipEmptyLines(), syslogDirective(), and usingDirective().
◆ skipEmptyLines()
| void MStringParser::skipEmptyLines |
( |
| ) |
|
|
private |
◆ expectEndOfLine()
| void MStringParser::expectEndOfLine |
( |
| ) |
|
|
private |
References atEnd(), error(), next(), peek(), skipBlanks(), and skipComments().
Referenced by charsetDirective(), classDirective(), directive(), errorDirective(), functionDirective(), importDirective(), includeDirective(), languageDirective(), messageDirective(), moduleDirective(), namespaceDirective(), parameterLine(), quotedTextLine(), setHeaderLine(), syslogDirective(), and usingDirective().
◆ readWhile()
| std::string MStringParser::readWhile |
( |
bool(*)(char) |
accept | ) |
|
|
private |
◆ readIdentifier()
| std::string MStringParser::readIdentifier |
( |
| ) |
|
|
private |
◆ requireIdentifier()
| std::string MStringParser::requireIdentifier |
( |
const std::string & |
what | ) |
|
|
private |
References error(), here(), peek(), readIdentifier(), and skipBlanks().
Referenced by classDirective(), classOption(), commonOption(), directive(), functionOption(), messageDirective(), parameterLine(), and readQualifiedName().
◆ requireWord()
| std::string MStringParser::requireWord |
( |
bool(*)(char) |
accept, |
|
|
const std::string & |
what |
|
) |
| |
|
private |
◆ readQualifiedName()
| std::string MStringParser::readQualifiedName |
( |
const std::string & |
what | ) |
|
|
private |
◆ readRestOfLine()
| std::string MStringParser::readRestOfLine |
( |
| ) |
|
|
private |
◆ readKeyword()
| std::string MStringParser::readKeyword |
( |
| ) |
|
|
private |
◆ error() [1/2]
| void MStringParser::error |
( |
const std::string & |
message, |
|
|
Location |
location |
|
) |
| |
|
private |
References _Context, _DisplayName, MStringParser::Location::col, ParseContext::diagnostics, and MStringParser::Location::line.
Referenced by classOption(), commonOption(), directive(), error(), errorDirective(), expectEndOfLine(), functionOption(), importDirective(), includeDirective(), macro(), messageDirective(), messageLine(), parameterLine(), quotedTextLine(), readQualifiedName(), requireIdentifier(), requireWord(), setHeaderLine(), syslogDirective(), unknownOption(), and usingDirective().
◆ error() [2/2]
| void MStringParser::error |
( |
const std::string & |
message | ) |
|
|
private |
◆ warning()
| void MStringParser::warning |
( |
const std::string & |
message, |
|
|
Location |
location |
|
) |
| |
|
private |
◆ directive()
| void MStringParser::directive |
( |
| ) |
|
|
private |
References _Context, MessageSettings::_Exception, MessageSettings::_Streamable, MessageSettings::_String, MessageSettings::_Throw, atEndOfLine(), charsetDirective(), classDirective(), closeMessage(), error(), errorDirective(), expectEndOfLine(), Module::Export, functionDirective(), here(), importDirective(), includeDirective(), languageDirective(), messageDirective(), ParseContext::module, moduleDirective(), namespaceDirective(), next(), readKeyword(), requireIdentifier(), ParseContext::settings, skipBlanks(), syslogDirective(), and usingDirective().
Referenced by classDirective(), functionDirective(), start(), and unknownOption().
◆ languageDirective()
| void MStringParser::languageDirective |
( |
| ) |
|
|
private |
◆ charsetDirective()
| void MStringParser::charsetDirective |
( |
| ) |
|
|
private |
◆ classDirective()
| void MStringParser::classDirective |
( |
ClassConcept & |
concept, |
|
|
const std::string & |
directive, |
|
|
bool |
exception |
|
) |
| |
|
private |
References ClassConcept::_Override, atEndOfLine(), classOption(), commonOption(), directive(), expectEndOfLine(), here(), readKeyword(), requireIdentifier(), skipBlanks(), and unknownOption().
Referenced by directive().
◆ functionDirective()
| void MStringParser::functionDirective |
( |
FunctionConcept & |
concept, |
|
|
const std::string & |
directive |
|
) |
| |
|
private |
◆ errorDirective()
| void MStringParser::errorDirective |
( |
| ) |
|
|
private |
References _Context, MessageSettings::_Error, ErrorConcept::_ExitCall, atEndOfLine(), commonOption(), error(), expectEndOfLine(), functionOption(), here(), readKeyword(), readRestOfLine(), ParseContext::settings, skipBlanks(), Trim(), and unknownOption().
Referenced by directive().
◆ syslogDirective()
| void MStringParser::syslogDirective |
( |
| ) |
|
|
private |
References _Context, LogConcept::_Facility, LogConcept::_Level, MessageSettings::_Log, atEndOfLine(), commonOption(), error(), expectEndOfLine(), functionOption(), here(), readKeyword(), readWhile(), ParseContext::settings, skipBlanks(), and unknownOption().
Referenced by directive().
◆ includeDirective()
| void MStringParser::includeDirective |
( |
| ) |
|
|
private |
References _Context, atEnd(), error(), expectEndOfLine(), here(), Module::Includes, ParseContext::module, next(), peek(), readIdentifier(), skipBlanks(), and Trim().
Referenced by directive().
◆ importDirective()
| void MStringParser::importDirective |
( |
| ) |
|
|
private |
References _Context, atEnd(), error(), expectEndOfLine(), here(), next(), parseFile(), peek(), readRestOfLine(), resolveImport(), and skipBlanks().
Referenced by directive().
◆ usingDirective()
| void MStringParser::usingDirective |
( |
| ) |
|
|
private |
◆ namespaceDirective()
| void MStringParser::namespaceDirective |
( |
| ) |
|
|
private |
◆ moduleDirective()
| void MStringParser::moduleDirective |
( |
| ) |
|
|
private |
References _Context, atEndOfLine(), expectEndOfLine(), Module::HeaderExtension, here(), Module::Inline, ParseContext::module, Module::Name, readKeyword(), requireWord(), skipBlanks(), Module::SourceExtension, unknownOption(), and warning().
Referenced by directive().
◆ messageDirective()
| void MStringParser::messageDirective |
( |
| ) |
|
|
private |
References Concept::_Active, _Context, _DisplayName, MessageSettings::_Error, MessageSettings::_Exception, _InMessage, MessageSettings::_Log, _MessageCharset, _MessageIndex, _MessageLanguage, _MessageLocation, MessageSettings::_Streamable, MessageSettings::_String, _TextStarted, MessageSettings::_Throw, atEndOfLine(), ParseContext::charset, MStringParser::Location::col, error(), expectEndOfLine(), Module::FindMessage(), here(), ParseContext::language, MStringParser::Location::line, Module::Messages, ParseContext::module, next(), peek(), readKeyword(), requireIdentifier(), ParseContext::settings, skipBlanks(), and ParseContext::trace.
Referenced by directive().
◆ commonOption()
| bool MStringParser::commonOption |
( |
Concept & |
concept, |
|
|
const std::string & |
option |
|
) |
| |
|
private |
References Concept::_Active, Concept::_Customized, Concept::_LocaleExtra, Concept::_Postfix, Concept::_Prefix, error(), here(), readKeyword(), and requireIdentifier().
Referenced by classDirective(), errorDirective(), functionDirective(), and syslogDirective().
◆ classOption()
| bool MStringParser::classOption |
( |
ClassConcept & |
concept, |
|
|
const std::string & |
option |
|
) |
| |
|
private |
References ClassConcept::_InheritanceType, ClassConcept::_Parent, error(), here(), next(), peek(), PRIVATE_INHERITANCE, PROTECTED_INHERITANCE, PUBLIC_INHERITANCE, readIdentifier(), readQualifiedName(), requireIdentifier(), and skipBlanks().
Referenced by classDirective().
◆ functionOption()
References FunctionConcept::_Constness, FunctionConcept::_Naming, FunctionConcept::_Type, error(), here(), MEMBER_AS, MEMBER_OF, NONMEMBER, readKeyword(), readQualifiedName(), and requireIdentifier().
Referenced by errorDirective(), functionDirective(), and syslogDirective().
◆ unknownOption()
| void MStringParser::unknownOption |
( |
const std::string & |
option, |
|
|
const std::string & |
directive, |
|
|
Location |
location |
|
) |
| |
|
private |
◆ messageLine()
| void MStringParser::messageLine |
( |
| ) |
|
|
private |
◆ parameterLine()
| void MStringParser::parameterLine |
( |
| ) |
|
|
private |
References _TextStarted, currentMessage(), error(), expectEndOfLine(), Message::FindParameter(), here(), Message::Name, next(), Message::Parameters, readRestOfLine(), requireIdentifier(), and skipBlanks().
Referenced by messageLine().
◆ setHeaderLine()
| void MStringParser::setHeaderLine |
( |
| ) |
|
|
private |
References _Context, _MessageCharset, _MessageLanguage, _TextStarted, ParseContext::charset, error(), expectEndOfLine(), here(), next(), peek(), requireWord(), skipBlanks(), and warning().
Referenced by messageLine().
◆ quotedTextLine()
| void MStringParser::quotedTextLine |
( |
char |
quote | ) |
|
|
private |
References _TextStarted, LocaleMessage::AppendText(), atEnd(), currentLocale(), error(), escapeSequence(), expectEndOfLine(), here(), macro(), next(), and peek().
Referenced by messageLine().
◆ barTextLine()
| void MStringParser::barTextLine |
( |
| ) |
|
|
private |
◆ escapeSequence()
| void MStringParser::escapeSequence |
( |
std::string & |
text | ) |
|
|
private |
◆ macro()
◆ currentLocale()
◆ currentMessage()
| Message & MStringParser::currentMessage |
( |
| ) |
|
|
private |
◆ resolveImport()
| std::string MStringParser::resolveImport |
( |
const std::string & |
filename | ) |
const |
|
private |
◆ closeMessage()
| void MStringParser::closeMessage |
( |
| ) |
|
|
private |
◆ _Context
Referenced by charsetDirective(), currentMessage(), directive(), error(), errorDirective(), importDirective(), includeDirective(), languageDirective(), messageDirective(), moduleDirective(), namespaceDirective(), parseFile(), parseStream(), resolveImport(), setHeaderLine(), syslogDirective(), usingDirective(), and warning().
◆ _DisplayName
| std::string MStringParser::_DisplayName |
|
private |
◆ _Last
| char MStringParser::_Last { '\n' } |
|
private |
The last consumed character.
Referenced by here(), and next().
◆ _InMessage
| bool MStringParser::_InMessage { false } |
|
private |
◆ _MessageIndex
| std::size_t MStringParser::_MessageIndex { 0 } |
|
private |
◆ _MessageLocation
| Location MStringParser::_MessageLocation { 0, 0 } |
|
private |
◆ _TextStarted
| bool MStringParser::_TextStarted { false } |
|
private |
◆ _MessageLanguage
| std::string MStringParser::_MessageLanguage |
|
private |
◆ _MessageCharset
| std::string MStringParser::_MessageCharset |
|
private |
The documentation for this class was generated from the following files: