Skip to content
Welcome to the new CppUtils documentation!

Namespace: CppUtils::Language::Lexer

enum class RecurrenceType {
Optional,
EqualTo,
MoreThan,
MoreOrEqualTo
};
using CppUtils::Language::Lexer::ParsingFunction = std::function<bool(Context<Types...>&)>;
using CppUtils::Language::Lexer::BreakPointLexeme = Typed<BreakPointLexemeType, void>;
using CppUtils::Language::Lexer::StringLexeme = Typed<StringLexemeType, std::string>;
using CppUtils::Language::Lexer::ParserLexeme = Typed<ParserLexemeType, NamedParser<Types...>>;
using CppUtils::Language::Lexer::TokenLexeme = Typed<TokenLexemeType, Type::Token>;
using CppUtils::Language::Lexer::TagLexeme = Typed<TagLexemeType, std::unique_ptr<ILexeme>>;
using CppUtils::Language::Lexer::MutedLexeme = Typed<MutedLexemeType, std::unique_ptr<ILexeme>>;
using CppUtils::Language::Lexer::RecurrentLexeme = Typed<RecurrentLexemeType, Recurrence>;
using CppUtils::Language::Lexer::AlternativeLexeme = Typed<AlternativeLexemeType, Alternative>;
using CppUtils::Language::Lexer::ExcludeLexeme = Typed<ExcludeLexemeType, Exclusion>;
auto CppUtils::Language::Lexer::BreakPointLexemeType;
auto CppUtils::Language::Lexer::StringLexemeType;
auto CppUtils::Language::Lexer::ParserLexemeType;
auto CppUtils::Language::Lexer::TokenLexemeType;
auto CppUtils::Language::Lexer::TagLexemeType;
auto CppUtils::Language::Lexer::MutedLexemeType;
auto CppUtils::Language::Lexer::RecurrentLexemeType;
auto CppUtils::Language::Lexer::AlternativeLexemeType;
auto CppUtils::Language::Lexer::ExcludeLexemeType;
template <class Element = char>
bool parseLexeme(String::Cursor<std::basic_string_view<Element>>& cursor, std::reference_wrapper<Container::ASTNode<Element>>& parentNode, Container::AST<Element>& ast, const Container::ASTNode<Element>& lexeme, const Container::AST<Element>& grammar, std::vector<Container::ASTNode<Element>>& memory);
template <class Element = char>
bool parseLexemes(String::Cursor<std::basic_string_view<Element>>& cursor, std::reference_wrapper<Container::ASTNode<Element>>& parentNode, Container::AST<Element>& ast, const Container::ASTNode<Element>& lexeme, const Container::AST<Element>& grammar, std::vector<Container::ASTNode<Element>>& memory);
template <class Element = char>
bool parseDeclaration(String::Cursor<std::basic_string_view<Element>>& cursor, std::reference_wrapper<Container::ASTNode<Element>>& parentNode, Container::AST<Element>& ast, const Container::ASTNode<Element>& declaration, const Container::AST<Element>& grammar, std::vector<Container::ASTNode<Element>>& memory);
template <class Element = char>
bool parseMultipleDeclaration(String::Cursor<std::basic_string_view<Element>>& cursor, std::reference_wrapper<Container::ASTNode<Element>>& parentNode, Container::AST<Element>& ast, const Container::ASTNode<Element>& declarationLexeme, const Container::AST<Element>& grammar, std::vector<Container::ASTNode<Element>>& memory);
template <class CharT = char>
Container::AST<CharT> parse(std::basic_string_view<CharT> src, const Container::AST<CharT>& grammar);
template <class TargetType>
TargetType& ensureType(const std::unique_ptr<ILexeme>& lexeme);
template <class... Types>
NamedParser(std::string, ParsingFunction<Types...>) -> NamedParser<Types...>;
template <class... Types>
NamedParser(std::string, bool(Context<Types...>&)) -> NamedParser<Types...>;
template <class... Types>
bool spaceParser(Context<Types...>& context);
template <class... Types>
bool keywordParser(Context<Types...>& context);
template <class... Types>
bool charParser(Context<Types...>& context);
template <class... Types>
bool escapeCharParser(Context<Types...>& context);
template <class... Types>
bool delimiterParser(Context<Types...>& context, std::string_view delimiter, std::type_identity_t<ParsingFunction<Types...>> contentParsingFunction, bool multipleContent, bool skipDelimiter);
template <class... Types>
bool stringParser(Context<Types...>& context, std::string_view delimiter, bool skipDelimiter);
template <class... Types>
bool quoteParser(Context<Types...>& context);
template <class... Types>
bool singleQuoteParser(Context<Types...>& context);
template <class... Types>
bool doubleQuoteParser(Context<Types...>& context);
template <class... Types>
bool uintParser(Context<Types...>& context);
template <class... Types>
bool intParser(Context<Types...>& context);
template <class... Types>
bool floatParser(Context<Types...>& context);
template <class... Types>
bool booleanParser(Context<Types...>& context);
template <class... Types>
bool trimModifier(Context<Types...>& context);
template <class... Types>
bool stringToTokenModifier(Context<Types...>& context);