mirror of
https://github.com/boostorg/parser.git
synced 2026-01-26 18:52:23 +00:00
Add unicode symbols parser (#213)
* Add symb parser to handle unicode symbols * Add documentation for symb * Add tests for symb * Fix typo in the documentation --------- Contributed by: Antoine Fontaine <antoinefontaine@posteo.net>
This commit is contained in:
committed by
GitHub
parent
0a34acc42a
commit
b253d9ca53
@@ -245,6 +245,13 @@ namespace boost { namespace parser { namespace detail {
|
||||
std::ostream & os,
|
||||
int components = 0);
|
||||
|
||||
template<typename Context>
|
||||
void print_parser(
|
||||
Context const & context,
|
||||
char_set_parser<symb_chars> const & parser,
|
||||
std::ostream & os,
|
||||
int components = 0);
|
||||
|
||||
template<typename Context>
|
||||
void print_parser(
|
||||
Context const & context,
|
||||
|
||||
@@ -636,6 +636,16 @@ namespace boost { namespace parser { namespace detail {
|
||||
os << "punct";
|
||||
}
|
||||
|
||||
template<typename Context>
|
||||
void print_parser(
|
||||
Context const & context,
|
||||
char_set_parser<symb_chars> const & parser,
|
||||
std::ostream & os,
|
||||
int components)
|
||||
{
|
||||
os << "symb";
|
||||
}
|
||||
|
||||
template<typename Context>
|
||||
void print_parser(
|
||||
Context const & context,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7811,12 +7811,18 @@ namespace boost { namespace parser {
|
||||
control;
|
||||
|
||||
/** The punctuation character parser. Matches the full set of Unicode
|
||||
punctuation clases (specifically, "Pc", "Pd", "Pe", "Pf", "Pi", "Ps",
|
||||
punctuation classes (specifically, "Pc", "Pd", "Pe", "Pf", "Pi", "Ps",
|
||||
and "Po"). */
|
||||
inline BOOST_PARSER_ALGO_CONSTEXPR
|
||||
parser_interface<char_set_parser<detail::punct_chars>>
|
||||
punct;
|
||||
|
||||
/** The symbol character parser. Matches the full set of Unicode
|
||||
symbol classes (specifically, "Sc", "Sk", "Sm", and "So"). */
|
||||
inline BOOST_PARSER_ALGO_CONSTEXPR
|
||||
parser_interface<char_set_parser<detail::symb_chars>>
|
||||
symb;
|
||||
|
||||
/** The lower case character parser. Matches the full set of Unicode
|
||||
lower case code points (class "Ll"). */
|
||||
inline BOOST_PARSER_ALGO_CONSTEXPR
|
||||
|
||||
@@ -143,6 +143,8 @@ namespace boost { namespace parser {
|
||||
|
||||
struct punct_chars
|
||||
{};
|
||||
struct symb_chars
|
||||
{};
|
||||
struct lower_case_chars
|
||||
{};
|
||||
struct upper_case_chars
|
||||
|
||||
Reference in New Issue
Block a user