CPP-TOOLBOX
Loading...
Searching...
No Matches
regex_utils.hpp File Reference
#include <regex>
#include <unordered_map>
#include "sbpt_generated_includes.hpp"

Go to the source code of this file.

Namespaces

namespace  regex_utils
 

Functions

std::string regex_utils::surround_with (const std::string &s, const std::string &w)
 
std::string regex_utils::capture (const std::string &s)
 
std::string regex_utils::non_capture_optional_group (const std::string &s)
 
std::vector< std::string > regex_utils::capture (const std::vector< std::string > &s)
 
std::string regex_utils::character_class (const std::vector< std::string > &chars)
 
std::string regex_utils::negated_character_class (const std::vector< std::string > &chars)
 
std::string regex_utils::one_or_more (const std::string &character_class)
 
std::string regex_utils::zero_or_more (const std::string &character_class)
 
std::string regex_utils::wrap_parentheses (const std::string &s)
 
const std::string regex_utils::string_literal (R"("(?:[^"\\]|\\.)*")")
 
const std::string regex_utils::char_literal (R"('(?:[^'\\]|\\.)')")
 
std::string regex_utils::tuple_of (const std::vector< std::string > &regexes)
 
std::regex regex_utils::function_signature_re (R"(^\s*([\w:<>()]+(?:\s*[*&])?)\s+(\w+)\s*\‍((.*)\‍)\s*$)")
 

Variables

const std::string regex_utils::start_of_line = R"(^)"
 
const std::string regex_utils::end_of_line = R"($)"
 
const std::string regex_utils::any_char = R"(.)"
 
const std::string regex_utils::any_char_greedy = R"(.*)"
 
const std::string regex_utils::any_char_nongreedy = R"(.*?)"
 
const std::string regex_utils::right_parenthesis = R"(\‍))"
 
const std::string regex_utils::left_parenthesis = R"(\‍()"
 
const std::string regex_utils::ws_char = R"(\s)"
 
const std::string regex_utils::optional_ws = R"(\s*)"
 
const std::string regex_utils::one_or_more_ws = R"(\s+)"
 
const std::string regex_utils::digit = R"(\d)"
 
const std::string regex_utils::nonzero_digit = R"([1-9])"
 
const std::string regex_utils::binary_digit = R"([0-1])"
 
const std::string regex_utils::lowercase_letter = R"([a-z])"
 
const std::string regex_utils::uppercase_letter = R"([A-Z])"
 
const std::string regex_utils::letter = R"([A-Za-z])"
 
const std::string regex_utils::word_char = R"(\w)"
 
const std::string regex_utils::word = R"(\w+)"
 
const std::string regex_utils::identifier = R"([A-Za-z_]\w*)"
 
const std::string regex_utils::optional_ws_comma = surround_with(",", optional_ws)
 
const std::string regex_utils::int_regex = R"(-?\d+)"
 
const std::string regex_utils::unsigned_int_regex = R"(\d+)"
 
const std::string regex_utils::float_regex = R"(-?\d+(?:\.\d+)?)"
 
const std::string regex_utils::captured_float_regex = capture(float_regex)
 
const std::string regex_utils::float_tuple
 
const std::string regex_utils::captured_float_tuple
 
const std::string regex_utils::float_triplet
 
const std::string regex_utils::captured_float_triplet
 
const std::string regex_utils::type_char_class = character_class({word_char, ws_char, ":", "<", ">", "(", ")"})
 
const std::string regex_utils::type
 
std::string regex_utils::function_signature_ree
 
std::string regex_utils::constructor_signature_re
 
const std::string regex_utils::simple_template_type